package com.dev.myloader;

/**
 * @description: 加载远程url 类文件
 * @className: NetClassLoadTest
 * @package: com.dev.myloader
 * @author: yangzhi@hsyuntai.com
 * @date: 2019-04-17 18:59
 * @copyright: 版权归 HSYUNTAI 所有
 */
public class NetClassLoadTest {

    public static void main(String[] args) {
        try {
            String url = "http://123.207.86.149/IHelloServiceImpl.class";
            NetClassLoader netClassLoader = new NetClassLoader(url);
            Class<?> object1 = netClassLoader.findClass("com.dev.demo.IHelloServiceImpl");
            System.out.println(object1.newInstance().toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
